package com.linewell.utils;

public class StringUtil {
    public static String upToLow(String str) {
        String newStr = "";
        int i = 0;
        char[] queue = str.toCharArray();

        for (int index = 0; index < queue.length; index++) {

            if (((int) queue[index] > 64) && ((int) queue[index] < 91)) {

                i = index;

            }

        }
        if (i != 0) {
            newStr = str.toLowerCase();
            newStr = newStr.substring(0, i) + "_" + newStr.substring(i);
            return newStr;
        } else {
            return str;
        }

    }

}
